      subroutine invcon (kop,fmc,deltd,gain)
      dimension cone(22,13), dfreq(22), ddeg(13)
      data dfreq/2.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0,
     1         13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 20.0, 22.0, 24.0,
     2         26.0, 28.0, 30.0/

      data ddeg/0.0, 5.0, 10.0, 15.0, 20.0, 25.0, 30.0, 35.0, 40.0,
     2          45.0, 50.0, 55.0, 90.0/
c***********************************************************************
c          I had to break apart the data statement for MS FORTRAN to compile
      data (cone(j, 1),j=1,22)/
     +-20.0,-20.0,-20.0,-20.0,-20.0,-20.0,-20.0,-20.0,-20.0,-20.0,-20.0,
     +-20.0,-20.0,-20.0,-20.0,-20.0,-20.0,-20.0,-20.0,-20.0,-20.0,-20.0/
      data (cone(j, 2),j=1,22)/
     + -9.0, -7.0, -8.2, -8.6, -8.8, -8.3, -7.7, -7.7, -8.3, -8.3, -8.0,
     + -8.0, -8.8,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0,-10.0/
      data (cone(j, 3),j=1,22)/
     + -5.0, -3.0, -3.5, -3.8, -3.9, -4.0, -4.1, -3.9, -4.7, -5.1, -4.9,
     + -4.7, -6.4, -7.0, -6.5, -6.0, -6.4, -7.6, -8.9,-10.0,-10.0,-10.0/
      data (cone(j, 4),j=1,22)/
     + -2.1,  -.1,  -.7, -1.0, -1.3, -1.4, -1.5, -1.7, -2.0, -2.6, -2.6,
     + -2.9, -4.7, -4.7, -4.0, -3.9, -4.7, -5.6, -6.7, -8.0,-10.0,-10.0/
      data (cone(j, 5),j=1,22)/
     +  -.7,  1.3,   .8,   .4,   .1,  -.7, -2.2, -2.3, -1.7, -2.4, -5.1,
     + -6.7, -5.0, -3.8, -3.5, -3.7, -4.3, -5.1, -5.7, -6.7, -8.3,-10.0/
      data (cone(j, 6),j=1,22)/
     +  -.5,  1.5,  1.4,  1.2,   .3, -1.0, -4.2, -4.7, -3.1, -2.9, -6.6,
     + -6.9, -4.0, -3.2, -3.7, -4.2, -4.8, -5.3, -5.6, -6.1, -7.6, -9.0/
      data (cone(j, 7),j=1,22)/
     +  -.3,  1.7,  1.6,  1.5,  1.2, -1.6, -5.5, -7.2, -6.0, -5.0, -8.0,
     + -8.5, -3.5, -2.7, -4.0, -4.7, -5.3, -5.7, -6.0, -6.9, -8.1,-10.0/
      data (cone(j, 8),j=1,22)/
     +  -.4,  1.5,  1.5,  1.5,  1.5, -2.2, -7.0,-11.5, -7.5, -5.8,-10.4,
     +-12.0, -2.5, -2.0, -4.3, -5.3, -6.3, -6.9, -7.4, -8.0, -9.0,-10.0/
      data (cone(j, 9),j=1,22)/
     +  -.5,  1.5,  1.5,  1.5,  1.3, -3.0, -8.4,-10.6, -6.7, -5.2, -9.8,
     +-14.0, -2.4, -2.4, -5.0, -6.2, -7.0, -7.8, -8.3,-10.0,-10.0,-10.0/
      data (cone(j,10),j=1,22)/
     +  -.8,  1.2,  1.3,  1.2,   .3, -4.1,-10.5,-11.3, -5.9, -5.0, -8.5,
     +-17.0, -7.5, -6.0, -6.4, -6.9, -7.6, -8.3,-10.0,-10.0,-10.0,-10.0/
      data (cone(j,11),j=1,22)/
     + -1.5,   .5,   .4,   .1, -1.0, -5.4,-12.1,-10.3, -6.1, -5.2, -8.5,
     +-17.0,-15.0,-10.3, -8.5, -8.0, -8.1, -8.8,-10.0,-10.0,-10.0,-10.0/
      data (cone(j,12),j=1,22)/
     + -2.2,  -.2,  -.5, -1.0, -2.2, -7.3,-12.0, -8.5, -5.6, -5.2, -7.5,
     +-15.5,-20.0,-15.0,-10.5, -8.9, -8.9,-10.0,-10.0,-10.0,-10.0,-10.0/
      data (cone(j,13),j=1,22)/
     +-40.0,-40.0,-40.0,-40.0,-40.0,-40.0,-40.0,-40.0,-40.0,-40.0,-40.0,
     +-40.0,-40.0,-40.0,-40.0,-40.0,-40.0,-40.0,-40.0,-40.0,-40.0,-40.0/
c***********************************************************************
      xint(a,b,c)=a*(1.0-c)+b*c
      wtf(a,b,c)=(a-b)/(c-b)
      if ( kop .ne. 30) stop ' check kop '
c     kop=30,  inverted cone antenna
      freq=fmc
      delta=deltd

      do 10 iang = 2,13
      if ( delta .gt. ddeg(iang) ) go to 10
      ian = iang
      go to 20
   10 continue

   20 do 30 ifrq = 2,22
      if ( freq .gt. dfreq(ifrq)) go to 30
      ifr = ifrq
      go to 40
   30 continue

   40 fwt=wtf(freq,dfreq(ifr),dfreq(ifr-1))
      awt=wtf(delta,ddeg(ian),ddeg(ian-1))
      g1=xint(cone(ifr,ian),cone(ifr,ian-1),awt)
      g2=xint(cone(ifr-1,ian),cone(ifr-1,ian-1),awt)
      gain=xint(g1,g2,fwt)
      return
      end
